var { shell } = require('electron')

document.querySelector('#aHref').onclick = function(e){
e.preventDefault()
var href = this.getAttribute('href')
shell.openExternal(href)
}

document.querySelector('#mybtn').onclick = function (e) {
  window.open('http://test.vmaotong.com:8095/')
}

document.querySelector('#mybtn2').onclick = function (e) {
  window.open(path.join(__dirname,'../static/popup_page.html'))
}

window.addEventListener('message', (msg) => {
  let mytext = document.querySelector('#mytext')
  mytext.innerHTML = JSON.stringify(msg)
})

